//
//  ViewController.m
//  CardSliderDome
//
//  Created by  张礼栋 on 2019/12/10.
//  Copyright © 2019 mobile. All rights reserved.
//

#import "ViewController.h"
#import "JJCardSliderView.h"
#import <Masonry/Masonry.h>

@interface ViewController ()
@property (nonatomic, strong) JJCardSliderView *card;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSArray *dataSource = @[
    [UIImage imageNamed:@"01"],
    [UIImage imageNamed:@"02"],
    [UIImage imageNamed:@"03"],
    [UIImage imageNamed:@"04"],
    [UIImage imageNamed:@"05"]
    ];
    
    _card = [[JJCardSliderView alloc] init];
    [_card setCardListData:dataSource];
    [self.view addSubview:_card];
    
    [_card mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.view);
        make.left.right.equalTo(self.view);
        make.height.equalTo(@([_card getViewHeight]));
    }];
}

- (void)reloadPage
{
    //下刷新页面
//    [_card setCardListData:dataSource];
}

@end
